<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The tidyNode class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="tidy.root.html">« tidy::root</a></li>
      <li style="float: right;"><a href="tidynode.construct.html">tidyNode::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.tidy.html">Tidy</a></li>
    <li>The tidyNode class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.tidynode" class="reference">
 <h1 class="title">The <span class="classname"><a href="class.tidynode.html" class="classname">tidyNode</a></span> class</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5, PHP 7, PHP 8)</p>
 

  <div class="section" id="tidynode.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    An HTML node in an HTML file, as detected by tidy.
   </p>
  </div>

 
  <div class="section" id="tidynode.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">final</span>
      <span class="modifier">class</span> <strong class="classname">tidyNode</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.tidynode.html#tidynode.props.value">$<var class="varname">value</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.tidynode.html#tidynode.props.name">$<var class="varname">name</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.tidynode.html#tidynode.props.type">$<var class="varname">type</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.tidynode.html#tidynode.props.line">$<var class="varname">line</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.tidynode.html#tidynode.props.column">$<var class="varname">column</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">bool</span>
      <var class="varname"><a href="class.tidynode.html#tidynode.props.proprietary">$<var class="varname">proprietary</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type">int</span><span class="type"></span></span>
      <var class="varname"><a href="class.tidynode.html#tidynode.props.id">$<var class="varname">id</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span>
      <var class="varname"><a href="class.tidynode.html#tidynode.props.attribute">$<var class="varname">attribute</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span>
      <var class="varname"><a href="class.tidynode.html#tidynode.props.child">$<var class="varname">child</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">private</span> <span class="methodname"><a href="tidynode.construct.html" class="methodname">__construct</a></span>()</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="tidynode.getparent.html" class="methodname">getParent</a></span>(): <span class="type"><span class="type">?</span><span class="type"><a href="class.tidynode.html" class="type tidyNode">tidyNode</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="tidynode.haschildren.html" class="methodname">hasChildren</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="tidynode.hassiblings.html" class="methodname">hasSiblings</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="tidynode.isasp.html" class="methodname">isAsp</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="tidynode.iscomment.html" class="methodname">isComment</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="tidynode.ishtml.html" class="methodname">isHtml</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="tidynode.isjste.html" class="methodname">isJste</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="tidynode.isphp.html" class="methodname">isPhp</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="tidynode.istext.html" class="methodname">isText</a></span>(): <span class="type">bool</span></div>

   }</div>


  </div>


  <div class="section" id="tidynode.props">
   <h2 class="title">属性</h2>
   <dl>
    
     <dt id="tidynode.props.value"><var class="varname">value</var></dt>

     <dd>

      <p class="para">The HTML representation of the node, including the surrounding tags.</p>
     </dd>

    
    
     <dt id="tidynode.props.name"><var class="varname">name</var></dt>

     <dd>

      <p class="para">The name of the HTML node</p>
     </dd>

    
    
     <dt id="tidynode.props.type"><var class="varname">type</var></dt>

     <dd>

      <p class="para">The type of the node (one of the <a href="tidy.constants.html#tidy.constants.nodetype" class="link">nodetype constants</a>, e.g. <strong><code>TIDY_NODETYPE_PHP</code></strong>)</p>
     </dd>

    
    
     <dt id="tidynode.props.line"><var class="varname">line</var></dt>

     <dd>

      <p class="para">The line number at which the tags is located in the file</p>
     </dd>

    
    
     <dt id="tidynode.props.column"><var class="varname">column</var></dt>

     <dd>

      <p class="para">The column number at which the tags is located in the file</p>
     </dd>

    
    
     <dt id="tidynode.props.proprietary"><var class="varname">proprietary</var></dt>

     <dd>

      <p class="para">Indicates if the node is a proprietary tag</p>
     </dd>

    
    
     <dt id="tidynode.props.id"><var class="varname">id</var></dt>

     <dd>

      <p class="para">The ID of the node (one of the <a href="tidy.constants.html#tidy.constants.tag" class="link">tag constants</a>, e.g. <strong><code>TIDY_TAG_FRAME</code></strong>)</p>
     </dd>

    
    
     <dt id="tidynode.props.attribute"><var class="varname">attribute</var></dt>

     <dd>

      <p class="para">
       An array of string, representing
       the attributes names (as keys) of the current node.
      </p>
     </dd>

    
    
     <dt id="tidynode.props.child"><var class="varname">child</var></dt>

     <dd>

      <p class="para">
       An array of <span class="classname"><strong class="classname">tidyNode</strong></span>, representing
       the children of the current node.
      </p>
     </dd>

    
   </dl>


 </div>

 </div>

 





























































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="tidynode.construct.html">tidyNode::__construct</a> — Private constructor to disallow direct instantiation</li><li><a href="tidynode.getparent.html">tidyNode::getParent</a> — Returns the parent node of the current node</li><li><a href="tidynode.haschildren.html">tidyNode::hasChildren</a> — Checks if a node has children</li><li><a href="tidynode.hassiblings.html">tidyNode::hasSiblings</a> — Checks if a node has siblings</li><li><a href="tidynode.isasp.html">tidyNode::isAsp</a> — Checks if this node is ASP</li><li><a href="tidynode.iscomment.html">tidyNode::isComment</a> — Checks if a node represents a comment</li><li><a href="tidynode.ishtml.html">tidyNode::isHtml</a> — Checks if a node is an element node</li><li><a href="tidynode.isjste.html">tidyNode::isJste</a> — Checks if this node is JSTE</li><li><a href="tidynode.isphp.html">tidyNode::isPhp</a> — Checks if a node is PHP</li><li><a href="tidynode.istext.html">tidyNode::isText</a> — Checks if a node represents text (no markup)</li></ul>
</div>
</div></div></body></html>